<script lang="tsx">
import {Component, Provide, ProvideReactive, Ref, Vue,} from 'vue-property-decorator'
import Child from "./Child.vue"
const symbol = Symbol('baz')


/**
 * export default {
  computed() {
    anotherComponent: {
      cache: false,
      get() {
        return this.$refs.anotherComponent as AnotherComponent
      }
    },
    button: {
      cache: false,
      get() {
        return this.$refs.aButton as HTMLButtonElement
      }
    }
  }
}
 */
@Component
export default class App extends Vue {
    @Ref()
    // readonly anotherComponent!: AnotherComponent
    @Ref()
    button!: HTMLButtonElement

    @Ref("refKey")
    button1!: HTMLButtonElement

    public mounted(): void {
        // console.log(this.button) // 这个是装饰器不传递参数，用默认的名字
        console.log(this.button1) // 获取html标签
    }

    render() {
        console.log()
        return (
            <div>
                <button ref="refKey">更改123</button>
            </div>
        )
    }
}
</script>

<style scoped>
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
</style>
